<template>
    <div class="com-nav">
        <router-link :class="{'active':routeName == 'index'}" tag="div" to="/"><i class="zx-icon">&#xe683;</i><span>主页</span></router-link>
        <router-link v-show="user.type!==1" :class="{'active':routeName == 'job'}" tag="div" to="/job"><i class="zx-icon">&#xe718;</i><span>工作台</span></router-link>
        <router-link :class="{'active':routeName == 'message'}" tag="div" to="/message"><i class="zx-icon">&#xe6af;</i><span>消息</span></router-link>
        <router-link :class="{'active':routeName == 'signing'}" tag="div" to="/release"><i class="zx-icon">&#xe772;</i><span>发布</span></router-link>
        <router-link v-show="user.type!==1" :class="{'active':routeName == 'home'}" tag="div" to="/home"><i class="zx-icon">&#xe6bc;</i><span>我</span></router-link>
        <router-link v-show="user.type==1" :class="{'active':routeName == 'company'}" tag="div" to="/company"><i class="zx-icon">&#xe6bc;</i><span>企业中心</span></router-link>
    </div>
</template>
<script>
    export default {
        props:['routeName'],
        data() {
            return {
                user:{}
            }
        },
        watch:{
            routeName(routeName){
                this.routeName = routeName;
                if(localStorage.getItem('user')){
                    this.user = JSON.parse(localStorage.getItem('user'))
                }
            },
        },

    };
</script>
<style lang="less" scoped>
    @import url('../../public/css/nav.less');
</style>


